package com.leps.nq.common.excel;


import cn.hutool.core.convert.Convert;
import com.alibaba.excel.converters.doubleconverter.DoubleStringConverter;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.data.ReadCellData;
import com.alibaba.excel.metadata.property.ExcelContentProperty;

import java.text.ParseException;

public class DoubleConverter extends DoubleStringConverter {
    @Override
    public Double convertToJavaData(ReadCellData<?> cellData, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) throws ParseException {
        return Convert.toDouble(cellData.getStringValue());
    }
}
